// License:

// Product:
// Author: Robert N. Tenney
// Copyright: April 2009

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation version 2
// of the License.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

//  This license covers all source code, binaries, and other materials related to this project
//  unless specifically stated otherwise.

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

using TenneySoftware.Engine;
using TenneySoftware.LevelGenerator;

namespace TenneySoftware.GraphicsManagers
{
    public interface IGraphicsManager: IDisposable
    {
        /// <summary>
        /// Offsets the level and map images by the given point value. This is cumulative.
        /// </summary>
        /// <param name="offset">Point to offset images.</param>
        void OffsetDisplay(Point offset);
        /// <summary>
        /// Sets the coordinates for screen to tile conversion.
        /// </summary>
        /// <param name="screenCoordinates">Screen location for translation.</param>
        void ScreenCoordinates(Point screenCoordinates);
        /// <summary>
        /// Resets the manager.
        /// </summary>
        void Reset();
        /// <summary>
        /// Sets the control to perform drawing functions onto.
        /// </summary>
        /// <param name="control">Window's control.</param>
        void SetGraphicsDevice(Control control);
        /// <summary>
        /// Causes updating of images. This will read any changes made and if there are changes, it will redraw the image. The
        /// screen updating is done only within the given frame rate.
        /// </summary>
        void Update();
        /// <summary>
        /// Toggles between level view and map view.
        /// </summary>
        void ToggleDisplay();
        
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Plugin")]
        /// <summary>
        /// Gets the name associated with this manager.
        /// </summary>
        string PluginName{
            get;
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Plugin")]
        /// <summary>
        /// Gets the description associated with this manager.
        /// </summary>
        string PluginDescription{
            get;
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Plugin")]
        /// <summary>
        /// Gets the type of screen this will draw onto.
        /// </summary>
        string PluginScreenType{
            get;
        }
        /// <summary>
        /// Gets a flag indicating whether or not the images have been generated.
        /// </summary>
        bool Generated {
            get;
        }
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "FOV")]
        /// <summary>
        /// Gets or sets the flag to indicate whether or not to use FOV/FOW information during drawing.
        /// </summary>
        bool DoFOV {
            get;
            set;
        }
        /// <summary>
        /// Gets or sets the flag to indicate whether or not to keep the images centered on the player.
        /// </summary>
        bool CenterPlayer {
            get;
            set;
        }
        /// <summary>
        /// Checks to see if the level view is the currently active display.
        /// </summary>
        bool LevelDisplayActive {
            get;
        }
        /// <summary>
        /// Gets the current tile's level location associated with the screen coordinates set with:
        /// void ScreenCoordinates(Point screenCoordinates).
        /// </summary>
        Point TileLocationFromScreenCoordinates {
            get;
        }
        /// <summary>
        /// Gets the current tile's display location associated with the screen coordinates set with:
        /// void ScreenCoordinates(Point screenCoordinates).
        /// </summary>
        Point TileImageLocation {
            get;
        }
        /// <summary>
        /// Checks to see if the manager has been initialized, and is ready for drawing.
        /// </summary>
        bool Ready {
            get;
        }
        /// <summary>
        /// Gets or sets the point to offset the display image.
        /// </summary>
        Point LevelOffset {
            get;
            set;
        }
        /// <summary>
        /// Gets or sets the point to offset the map image.
        /// </summary>
        Point MapOffset {
            get;
            set;
        }
        /// <summary>
        /// Gets or sets the tile size for drawing tiles on the level display.
        /// </summary>
        Size TileSizeLevel {
            get;
            set;
        }
        /// <summary>
        /// Gets or sets the tile size for drawing tiles on the map display.
        /// </summary>
        Size TileSizeMap {
            get;
            set;
        }
        /// <summary>
        /// Gets or sets the RPG engine to interact with.
        /// </summary>
        RPGEngine Engine {
            get;
            set;
        }       
        /// <summary>
        /// Gets the frame rate.
        /// </summary>
        int FrameRate {
            get;
        }
        
        string Message{
            get;
            set;
        }
    }
}
